3.1.86 \(\int \frac {\text {sech}(c+d x)}{(a+b \text {sech}^2(c+d x))^2} \, dx\) [86]

Optimal. Leaf size=82 \[ \frac {(2 a+b) \text {ArcTan}\left (\frac {\sqrt {a} \sinh (c+d x)}{\sqrt {a+b}}\right )}{2 a^{3/2} (a+b)^{3/2} d}-\frac {b \sinh (c+d x)}{2 a (a+b) d \left (a+b+a \sinh ^2(c+d x)\right )} \]

[Out]

1/2*(2*a+b)*arctan(sinh(d*x+c)*a^(1/2)/(a+b)^(1/2))/a^(3/2)/(a+b)^(3/2)/d-1/2*b*sinh(d*x+c)/a/(a+b)/d/(a+b+a*s
inh(d*x+c)^2)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4232, 393, 211} \begin {gather*} \frac {(2 a+b) \text {ArcTan}\left (\frac {\sqrt {a} \sinh (c+d x)}{\sqrt {a+b}}\right )}{2 a^{3/2} d (a+b)^{3/2}}-\frac {b \sinh (c+d x)}{2 a d (a+b) \left (a \sinh ^2(c+d x)+a+b\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sech[c + d*x]/(a + b*Sech[c + d*x]^2)^2,x]

[Out]

((2*a + b)*ArcTan[(Sqrt[a]*Sinh[c + d*x])/Sqrt[a + b]])/(2*a^(3/2)*(a + b)^(3/2)*d) - (b*Sinh[c + d*x])/(2*a*(
a + b)*d*(a + b + a*Sinh[c + d*x]^2))

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 393

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d))*x*((a + b*x^n)^(p
 + 1)/(a*b*n*(p + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 4232

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fr
eeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2*x^2)^
((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n
/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\text {sech}(c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^2} \, dx &=\frac {\text {Subst}\left (\int \frac {1+x^2}{\left (a+b+a x^2\right )^2} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=-\frac {b \sinh (c+d x)}{2 a (a+b) d \left (a+b+a \sinh ^2(c+d x)\right )}+\frac {(2 a+b) \text {Subst}\left (\int \frac {1}{a+b+a x^2} \, dx,x,\sinh (c+d x)\right )}{2 a (a+b) d}\\ &=\frac {(2 a+b) \tan ^{-1}\left (\frac {\sqrt {a} \sinh (c+d x)}{\sqrt {a+b}}\right )}{2 a^{3/2} (a+b)^{3/2} d}-\frac {b \sinh (c+d x)}{2 a (a+b) d \left (a+b+a \sinh ^2(c+d x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.21, size = 124, normalized size = 1.51 \begin {gather*} \frac {\left (2 a^2+3 a b+b^2\right ) \text {ArcTan}\left (\frac {\sqrt {a} \sinh (c+d x)}{\sqrt {a+b}}\right )-\sqrt {a} b \sqrt {a+b} \sinh (c+d x)+a (2 a+b) \text {ArcTan}\left (\frac {\sqrt {a} \sinh (c+d x)}{\sqrt {a+b}}\right ) \sinh ^2(c+d x)}{a^{3/2} (a+b)^{3/2} d (a+2 b+a \cosh (2 (c+d x)))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sech[c + d*x]/(a + b*Sech[c + d*x]^2)^2,x]

[Out]

((2*a^2 + 3*a*b + b^2)*ArcTan[(Sqrt[a]*Sinh[c + d*x])/Sqrt[a + b]] - Sqrt[a]*b*Sqrt[a + b]*Sinh[c + d*x] + a*(
2*a + b)*ArcTan[(Sqrt[a]*Sinh[c + d*x])/Sqrt[a + b]]*Sinh[c + d*x]^2)/(a^(3/2)*(a + b)^(3/2)*d*(a + 2*b + a*Co
sh[2*(c + d*x)]))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(200\) vs. \(2(70)=140\).
time = 2.15, size = 201, normalized size = 2.45

method result size
derivativedivides \(\frac {\frac {\frac {b \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a \left (a +b \right )}-\frac {b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{a \left (a +b \right )}}{a \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+b \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b}+\frac {\left (2 a +b \right ) \left (\frac {\arctan \left (\frac {2 \sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+2 \sqrt {b}}{2 \sqrt {a}}\right )}{2 \sqrt {a +b}\, \sqrt {a}}+\frac {\arctan \left (\frac {2 \sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \sqrt {b}}{2 \sqrt {a}}\right )}{2 \sqrt {a +b}\, \sqrt {a}}\right )}{a \left (a +b \right )}}{d}\) \(201\)
default \(\frac {\frac {\frac {b \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a \left (a +b \right )}-\frac {b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{a \left (a +b \right )}}{a \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+b \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b}+\frac {\left (2 a +b \right ) \left (\frac {\arctan \left (\frac {2 \sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+2 \sqrt {b}}{2 \sqrt {a}}\right )}{2 \sqrt {a +b}\, \sqrt {a}}+\frac {\arctan \left (\frac {2 \sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \sqrt {b}}{2 \sqrt {a}}\right )}{2 \sqrt {a +b}\, \sqrt {a}}\right )}{a \left (a +b \right )}}{d}\) \(201\)
risch \(-\frac {{\mathrm e}^{d x +c} b \left ({\mathrm e}^{2 d x +2 c}-1\right )}{a d \left (a +b \right ) \left (a \,{\mathrm e}^{4 d x +4 c}+2 a \,{\mathrm e}^{2 d x +2 c}+4 b \,{\mathrm e}^{2 d x +2 c}+a \right )}-\frac {\ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \left (a +b \right ) {\mathrm e}^{d x +c}}{\sqrt {-a^{2}-a b}}-1\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right ) d}-\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \left (a +b \right ) {\mathrm e}^{d x +c}}{\sqrt {-a^{2}-a b}}-1\right )}{4 \sqrt {-a^{2}-a b}\, \left (a +b \right ) d a}+\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \left (a +b \right ) {\mathrm e}^{d x +c}}{\sqrt {-a^{2}-a b}}-1\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right ) d}+\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \left (a +b \right ) {\mathrm e}^{d x +c}}{\sqrt {-a^{2}-a b}}-1\right )}{4 \sqrt {-a^{2}-a b}\, \left (a +b \right ) d a}\) \(308\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(d*x+c)/(a+b*sech(d*x+c)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(2*(1/2/a*b/(a+b)*tanh(1/2*d*x+1/2*c)^3-1/2/a*b/(a+b)*tanh(1/2*d*x+1/2*c))/(a*tanh(1/2*d*x+1/2*c)^4+b*tanh
(1/2*d*x+1/2*c)^4+2*a*tanh(1/2*d*x+1/2*c)^2-2*b*tanh(1/2*d*x+1/2*c)^2+a+b)+(2*a+b)/a/(a+b)*(1/2/(a+b)^(1/2)/a^
(1/2)*arctan(1/2*(2*(a+b)^(1/2)*tanh(1/2*d*x+1/2*c)+2*b^(1/2))/a^(1/2))+1/2/(a+b)^(1/2)/a^(1/2)*arctan(1/2*(2*
(a+b)^(1/2)*tanh(1/2*d*x+1/2*c)-2*b^(1/2))/a^(1/2))))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)/(a+b*sech(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

-(b*e^(3*d*x + 3*c) - b*e^(d*x + c))/(a^3*d + a^2*b*d + (a^3*d*e^(4*c) + a^2*b*d*e^(4*c))*e^(4*d*x) + 2*(a^3*d
*e^(2*c) + 3*a^2*b*d*e^(2*c) + 2*a*b^2*d*e^(2*c))*e^(2*d*x)) + 2*integrate(1/2*((2*a*e^(3*c) + b*e^(3*c))*e^(3
*d*x) + (2*a*e^c + b*e^c)*e^(d*x))/(a^3 + a^2*b + (a^3*e^(4*c) + a^2*b*e^(4*c))*e^(4*d*x) + 2*(a^3*e^(2*c) + 3
*a^2*b*e^(2*c) + 2*a*b^2*e^(2*c))*e^(2*d*x)), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 932 vs. \(2 (70) = 140\).
time = 0.40, size = 1856, normalized size = 22.63 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)/(a+b*sech(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

[-1/4*(4*(a^2*b + a*b^2)*cosh(d*x + c)^3 + 12*(a^2*b + a*b^2)*cosh(d*x + c)*sinh(d*x + c)^2 + 4*(a^2*b + a*b^2
)*sinh(d*x + c)^3 + ((2*a^2 + a*b)*cosh(d*x + c)^4 + 4*(2*a^2 + a*b)*cosh(d*x + c)*sinh(d*x + c)^3 + (2*a^2 +
a*b)*sinh(d*x + c)^4 + 2*(2*a^2 + 5*a*b + 2*b^2)*cosh(d*x + c)^2 + 2*(3*(2*a^2 + a*b)*cosh(d*x + c)^2 + 2*a^2
+ 5*a*b + 2*b^2)*sinh(d*x + c)^2 + 2*a^2 + a*b + 4*((2*a^2 + a*b)*cosh(d*x + c)^3 + (2*a^2 + 5*a*b + 2*b^2)*co
sh(d*x + c))*sinh(d*x + c))*sqrt(-a^2 - a*b)*log((a*cosh(d*x + c)^4 + 4*a*cosh(d*x + c)*sinh(d*x + c)^3 + a*si
nh(d*x + c)^4 - 2*(3*a + 2*b)*cosh(d*x + c)^2 + 2*(3*a*cosh(d*x + c)^2 - 3*a - 2*b)*sinh(d*x + c)^2 + 4*(a*cos
h(d*x + c)^3 - (3*a + 2*b)*cosh(d*x + c))*sinh(d*x + c) - 4*(cosh(d*x + c)^3 + 3*cosh(d*x + c)*sinh(d*x + c)^2
 + sinh(d*x + c)^3 + (3*cosh(d*x + c)^2 - 1)*sinh(d*x + c) - cosh(d*x + c))*sqrt(-a^2 - a*b) + a)/(a*cosh(d*x
+ c)^4 + 4*a*cosh(d*x + c)*sinh(d*x + c)^3 + a*sinh(d*x + c)^4 + 2*(a + 2*b)*cosh(d*x + c)^2 + 2*(3*a*cosh(d*x
 + c)^2 + a + 2*b)*sinh(d*x + c)^2 + 4*(a*cosh(d*x + c)^3 + (a + 2*b)*cosh(d*x + c))*sinh(d*x + c) + a)) - 4*(
a^2*b + a*b^2)*cosh(d*x + c) - 4*(a^2*b + a*b^2 - 3*(a^2*b + a*b^2)*cosh(d*x + c)^2)*sinh(d*x + c))/((a^5 + 2*
a^4*b + a^3*b^2)*d*cosh(d*x + c)^4 + 4*(a^5 + 2*a^4*b + a^3*b^2)*d*cosh(d*x + c)*sinh(d*x + c)^3 + (a^5 + 2*a^
4*b + a^3*b^2)*d*sinh(d*x + c)^4 + 2*(a^5 + 4*a^4*b + 5*a^3*b^2 + 2*a^2*b^3)*d*cosh(d*x + c)^2 + 2*(3*(a^5 + 2
*a^4*b + a^3*b^2)*d*cosh(d*x + c)^2 + (a^5 + 4*a^4*b + 5*a^3*b^2 + 2*a^2*b^3)*d)*sinh(d*x + c)^2 + (a^5 + 2*a^
4*b + a^3*b^2)*d + 4*((a^5 + 2*a^4*b + a^3*b^2)*d*cosh(d*x + c)^3 + (a^5 + 4*a^4*b + 5*a^3*b^2 + 2*a^2*b^3)*d*
cosh(d*x + c))*sinh(d*x + c)), -1/2*(2*(a^2*b + a*b^2)*cosh(d*x + c)^3 + 6*(a^2*b + a*b^2)*cosh(d*x + c)*sinh(
d*x + c)^2 + 2*(a^2*b + a*b^2)*sinh(d*x + c)^3 - ((2*a^2 + a*b)*cosh(d*x + c)^4 + 4*(2*a^2 + a*b)*cosh(d*x + c
)*sinh(d*x + c)^3 + (2*a^2 + a*b)*sinh(d*x + c)^4 + 2*(2*a^2 + 5*a*b + 2*b^2)*cosh(d*x + c)^2 + 2*(3*(2*a^2 +
a*b)*cosh(d*x + c)^2 + 2*a^2 + 5*a*b + 2*b^2)*sinh(d*x + c)^2 + 2*a^2 + a*b + 4*((2*a^2 + a*b)*cosh(d*x + c)^3
 + (2*a^2 + 5*a*b + 2*b^2)*cosh(d*x + c))*sinh(d*x + c))*sqrt(a^2 + a*b)*arctan(1/2*(a*cosh(d*x + c)^3 + 3*a*c
osh(d*x + c)*sinh(d*x + c)^2 + a*sinh(d*x + c)^3 + (3*a + 4*b)*cosh(d*x + c) + (3*a*cosh(d*x + c)^2 + 3*a + 4*
b)*sinh(d*x + c))/sqrt(a^2 + a*b)) - ((2*a^2 + a*b)*cosh(d*x + c)^4 + 4*(2*a^2 + a*b)*cosh(d*x + c)*sinh(d*x +
 c)^3 + (2*a^2 + a*b)*sinh(d*x + c)^4 + 2*(2*a^2 + 5*a*b + 2*b^2)*cosh(d*x + c)^2 + 2*(3*(2*a^2 + a*b)*cosh(d*
x + c)^2 + 2*a^2 + 5*a*b + 2*b^2)*sinh(d*x + c)^2 + 2*a^2 + a*b + 4*((2*a^2 + a*b)*cosh(d*x + c)^3 + (2*a^2 +
5*a*b + 2*b^2)*cosh(d*x + c))*sinh(d*x + c))*sqrt(a^2 + a*b)*arctan(1/2*sqrt(a^2 + a*b)*(cosh(d*x + c) + sinh(
d*x + c))/(a + b)) - 2*(a^2*b + a*b^2)*cosh(d*x + c) - 2*(a^2*b + a*b^2 - 3*(a^2*b + a*b^2)*cosh(d*x + c)^2)*s
inh(d*x + c))/((a^5 + 2*a^4*b + a^3*b^2)*d*cosh(d*x + c)^4 + 4*(a^5 + 2*a^4*b + a^3*b^2)*d*cosh(d*x + c)*sinh(
d*x + c)^3 + (a^5 + 2*a^4*b + a^3*b^2)*d*sinh(d*x + c)^4 + 2*(a^5 + 4*a^4*b + 5*a^3*b^2 + 2*a^2*b^3)*d*cosh(d*
x + c)^2 + 2*(3*(a^5 + 2*a^4*b + a^3*b^2)*d*cosh(d*x + c)^2 + (a^5 + 4*a^4*b + 5*a^3*b^2 + 2*a^2*b^3)*d)*sinh(
d*x + c)^2 + (a^5 + 2*a^4*b + a^3*b^2)*d + 4*((a^5 + 2*a^4*b + a^3*b^2)*d*cosh(d*x + c)^3 + (a^5 + 4*a^4*b + 5
*a^3*b^2 + 2*a^2*b^3)*d*cosh(d*x + c))*sinh(d*x + c))]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {sech}{\left (c + d x \right )}}{\left (a + b \operatorname {sech}^{2}{\left (c + d x \right )}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)/(a+b*sech(d*x+c)**2)**2,x)

[Out]

Integral(sech(c + d*x)/(a + b*sech(c + d*x)**2)**2, x)

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)/(a+b*sech(d*x+c)^2)^2,x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Warning, need to choose a branch for the root of a polynomial with parameters. This might be wrong.The choi
ce was done

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{\mathrm {cosh}\left (c+d\,x\right )\,{\left (a+\frac {b}{{\mathrm {cosh}\left (c+d\,x\right )}^2}\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cosh(c + d*x)*(a + b/cosh(c + d*x)^2)^2),x)

[Out]

int(1/(cosh(c + d*x)*(a + b/cosh(c + d*x)^2)^2), x)

________________________________________________________________________________________